<template>
    <div class="mui-numbox" data-numbox-min='1' style="height: 25px;">
            <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
            <input class="mui-input-numbox" type="number" ref="num" :value="val" @change="numChange">
            <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
    </div>
</template>

<script>
import mui from '../../lib/mui/dist/js/mui.min.js';
export default {
    methods: {
        numChange() {
            let data = {
                id: this.id,
                count: this.$refs.num.value,
            }
            this.$store.commit('carChange',data);
        }
    },
    mounted() {
        mui('.mui-numbox').numbox();
    },
    props: ['val','id']
}
</script>

<style lang="less">
    
</style>